package gradation.impl;

import gradation.AbstractGradation;
import gradation.RGBBand;

import java.util.Arrays;

public class RGBBandGradation extends AbstractGradation {

	private RGBBand band;
	
	public RGBBandGradation(RGBBand band) {
		this.band = band;
	}
	
	@Override
	public int[] processPixel(int[] pixel, int x, int y) {
		int val = pixel[band.getValue()];
		Arrays.fill(pixel, val);
		return pixel;
	}

}
